package com.sdy.approval.biz.mapper;

import java.util.List;

import com.sdy.approval.biz.model.TpApproveFlowConfig;
import com.sdy.mvc.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 流程配置 Mapper 接口
 * </p>
 *
 * @author cgj
 * @since 2019-08-09
 */
public interface TpApproveFlowConfigMapper extends BaseMapper<TpApproveFlowConfig> {

	/**
	 * 查询最大流程id
	 * @return
	 */
	Integer selectMaxFlowId();

	/**
	 * 通过资源id查询流程配置
	 * @param resId
	 * @return
	 */
	List<TpApproveFlowConfig> selectApprveFlowConfig(String resId);

	/**
	 * 通过资源id和当前流程节点查询流程配置
	 * @param resId
	 * @param currentFlowLink
	 * @return
	 */
	TpApproveFlowConfig findByResIdAndCurrentFlowLink(@Param("resId") String resId,
													  @Param("currentFlowLink") int currentFlowLink);

}
